import { IsInt, IsNotEmpty, IsOptional, IsString } from "class-validator";

export class ArticleCommentDTO {
  @IsInt()
  @IsNotEmpty()
  readonly article_id: number;

  @IsInt()
  @IsOptional()
  readonly parent_id: number;

  @IsString()
  @IsNotEmpty()
  readonly commenter: string;

  @IsString()
  @IsOptional()
  readonly commenter_email: string;

  @IsString()
  @IsOptional()
  readonly commenter_site?: string;

  @IsString()
  @IsNotEmpty()
  readonly content: string;
}
